package com.comtop.topcloud.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.comtop.topcloud.device.model.mysql.EnergyEfficiencyAssessment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EnergyEfficiencyAssessmentMapper extends BaseMapper<EnergyEfficiencyAssessment> {

    @Insert({
            "<script>",
            "INSERT INTO `energy_efficiency_assessment` (id, project_name, project_type, indicator_name, current_value, standard_value, perfect_value, current_status_assessment, create_time) VALUES ",
            "<foreach collection='list' item='item' separator=','>",
            "(#{item.id}, #{item.projectName}, #{item.projectType}, #{item.indicatorName}, #{item.currentValue}, #{item.standardValue}, #{item.perfectValue}, #{item.currentStatusAssessment}, #{item.createTime})",
            "</foreach>",
            "</script>"
    })
    int batchInsert(@Param("list") List<EnergyEfficiencyAssessment> assessmentList);
}
